package com.mycompany.app.webapp.action.person;

import java.util.List;

import org.apache.struts2.config.Result;

import com.mycompany.app.model.Person;
import com.opensymphony.xwork2.Action;

@Result( name=Action.SUCCESS, value = "/WEB-INF/pages/person/list.jsp" )
public class ListAction extends BaseAction {

	private List<Person> persons;
	
	public List<Person> getPersons() {
		return persons;
	}

	@Override
	public String execute() throws Exception {
		log.debug("Retrieving all persons");
		persons = personManager.getAll();
		return SUCCESS;
	}

}
